package s_004_Bean_Automatic_Assembly.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import s_004_Bean_Automatic_Assembly.dao.BookDao;

/**
 * @Service 名字默认是类名首字母小写
 */
@Service
public class BookService {

    @Qualifier("bookDao")
    @Autowired(required = false)
    private BookDao bookDao;

    @Override
    public String toString() {
        return "BookService [bookDao=" + bookDao + "]";
    }
}